from flask import request

from zvms.util import *

Report = Blueprint('Report', __name__)

ReportForm = Form(
    report=[Required]
)

@Report.route('/report', methods=['POST'])
def report():
    print(request.form)
    if ReportForm.validate_on_submit():
        post('/report', report=request.form.get('report'))
        return redirect('/')
    return redirect(request.url)